if exists(path'/count') then do;call open(file,path'/count','R');te = readln(file);call close(file);end
sendstring 'c2Searching For New Writings...'
new = 0
if ~exists(path'/users') then do;call open(file,path'/users','W');call close(file);end
call open(file,path'/users','R')
p = 0;a = 0
do until eof(file)
p = seek(file,a*35,'B')
name = readch(file,30)
w = readch(file,5)
if trim(name) = user then leave
a = a +1
end
call close(file)
if trim(name) ~= user then do;call open(file,path'/users','A');seek(file,p,'B');writech(file,substr(user,1,30,' '));w = 0;writech(file,substr('0',1,5,' '));call close(file);end
if ~exists(path'/data') then do;total = 0;suser = 'TRINITY BBS';line1 = 'Trinity BBS Wall Has Been Reset';line2 = '';line3 = '';call savewall;end
call open(file,path'/data','R')
begin:
seek(file,(w*288),'B')
do while ~eof(file)
w = w + 1
ndte = readch(file,8)
nuser = readch(file,20)
ruser = readch(file,20)
nline1 = readch(file,80)
nline2 = readch(file,80)
nline3 = readch(file,80)
if nuser = ' ' then leave
if new = 0 then transmit ''
transmit 'c1'substr('',1,80,'®')
if level < sysop then ruser = substr('',1,20,' ')
else ruser = '* 'trim(ruser)' *'
ruser = substr(ruser,1,20,' ')
otr = 'Entry #'w' By : c6'nuser
otr = substr(otr,1,40,' ')
transmit ' c3'otr' 'ruser ' c3Date : c6'ndte
transmit 'n1c7'center(trim(nline1),79)
transmit center(trim(nline2),79)
transmit center(trim(nline3),79)
transmit 'c4'substr('',1,80,'®')
new = 1
m = m + 1
if m // 3 = 0 then
do
sendstring 'n1c3'w' of 'te' c1Qc4)uit, c1Cc4)ontinue, c1Jc4)ump? c1'
getchar
an = result
if an = '###PANIC' then exit
if upper(an) = 'Q' then
do
transmit 'Quit!'
call savestats
signal editwall
end
if upper(an) = 'J' then
do
transmit 'Jumpn1'
call close(file)
jump:
query 'c3Enter New Entry Number : c7'
w = result
if w = '###PANIC' then exit
if ~datatype(w,'N') then w = te + 2
w = w - 1
if w > te then do;transmit 'c1From 1 to 'te' Please!n1';signal jump;end
call open(file,path'/data','R')
seek(file,(w*288),'B')
signal begin
end
transmit "Let's Read More Of 'Em!"
end
end
if new = 0 then transmit 'n1c7There Is No New Grafiti.'
else transmit 'n1c7End Of Entries.'
call savestats
w = w - 1
chjk:
sendstring 'n1c3'w' of 'te' c1Qc4)uit or c1Jc4)ump? c1'
getchar
an = result
if an = '###PANIC' then exit
if an = 'J' then
do
transmit 'Jumpn1'
call close(file)
jump1:
query 'c3Enter New Entry Number : c7'
w = result
if w = '###PANIC' then exit
if ~datatype(w,'N') then w = te + 2
w = w - 1
if w > te then do;transmit 'c1From 1 to 'te' Please!n1';signal jump1;end
call open(file,path'/data','R')
seek(file,(w*288),'B')
signal begin
end
if an ~= 'Q' then signal chjk
transmit 'Quit!n1'
signal editwall
exit
savestats:
call close(file)
call open(file,path'/users','A')
seek(file,p,'B')
writech(file,substr(user,1,30,' '))
writech(file,substr(w-1,1,5,' '))
call close(file)
return
savewall:
if ~exists(path'/data') then do;call open(file,path'/data','W');call close(file);end
call open(file,path'/data','A')
writech(file,dte)
writech(file,substr(suser,1,20,' '))
writech(file,substr(user,1,20,' '))
writech(file,substr(line1,1,80,' '))
writech(file,substr(line2,1,80,' '))
writech(file,substr(line3,1,80,' '))
call close(file)
call open(file,path'/count','W')
te = te + 1
writeln(file,te)
call close(file)
return
editwall:
sendstring 'n1c2Would You Like To Write To The Wall (Y/n)? c1'
getchar
an = result
if an = '###PANIC' then exit
if upper(an) = 'N' then do;transmit 'Nope!';return;end
transmit 'Yes!'
sendstring 'n1c2Will You Be Signing Anonymously? (y/N)? c1'
getchar
an = result
if an = '###PANIC' then exit
if upper(an) = 'Y' then do;transmit 'Yes!';suser = 'ANONYMOUS';end
else do;transmit 'Nope!';suser = user;end
transmit 'n1c2Enter A Three Line Piece Of Grafiti!n1'
line1 = '';line2 = '';line3 = ''
query 'c21> c7'
line1 = result
if line1 = '' then signal editwall
query 'c22> c7'
line2 = result
if line2 = '' then signal editwalla
query 'c23> c7'
line3 = result
signal editwalla
editwalla:
transmit 'n1c2You Entered : n1c7'
transmit center(trim(line1),79)
transmit center(trim(line2),79)
transmit center(trim(line3),79)
sendstring 'n1c2Does This Look Ok? (Y/n)? c1'
getchar
an = result
if an = "###PANIC" then exit
if upper(an) = 'N' then do;transmit 'Nope!';signal editwall;end
transmit 'Yes! n2c2Adding Your Grafiti To The Wall...'